#pragma once

#include <linux/types.h>
#include <linux/spinlock.h>

struct list_lru_one
{
    struct list_head list;
    /* may become negative during memcg reparenting */
    long nr_items;
    /* protects all fields above */
    spinlock_t lock;
};

struct list_lru_node
{
    /* global list, used for the root cgroup in cgroup aware lrus */
    struct list_lru_one lru;
    long nr_items;
};

struct list_lru
{
    struct list_lru_node *node;
};
